import { h, Component } from 'preact';
import classNames from 'classnames';

class TitlePanel extends Component {
	constructor(props) {
		super(props);
		this.state = {

		};
	}

	componentDidMount() {

	}

	render({ children,title,type,extra },state) {
        
		return (
			<div className={'panel panel-'+type}>
				<div className="panel-heading">
					<div className="row">
						<span className="col-lg-6 col-md-6 col-sm-6 col-xm-6">
							{title}
						</span>
						<span className="col-lg-6 col-md-6 col-sm-6 col-xm-6">
							<span className="pull-right">
								{extra}
							</span>
						</span>
					</div>
				</div>
				<div className={classNames('panel-body')}>
					{children}
				</div>
			</div>
		);
	}
}

TitlePanel.propTypes = {

};

TitlePanel.defaultProps = {
	type: 'default'
};

export default TitlePanel;
